package com.junzhiit.nengji.app.web.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import com.junzhiit.nengji.app.service.IndustryService;
import com.junzhiit.nengji.app.web.util.Constants;
import com.junzhiit.nengji.app.web.vo.ResultVO;

import io.swagger.annotations.ApiOperation;

@RestController
@RequestMapping("/industry")
public class IndustryController extends BaseController {

	@Autowired
	private IndustryService industryService;

	// 获得类型信息
	@ApiOperation(value = "获取行业类别")
	@RequestMapping(method = RequestMethod.GET)
	public ResultVO getIndustryList(String parentId) {
		return industryService.getIndustryList(parentId);
	}

	@ApiOperation(value = "获取行业名称(下拉框)")
	@RequestMapping(value = "/get/industry/list", method = RequestMethod.GET)
	public ResultVO getIndustryFullName() {
		return industryService.getIndustryFullName(Constants.ROOT_VALUE);
	}
	
	@ApiOperation(value="获取所有行业信息(下拉框)")
	@RequestMapping(value="/get/all",method=RequestMethod.GET)
	public ResultVO getAll(String sessionId){
		return industryService.getAll();
	}
}
